package com.share.device.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.share.device.domain.Cabinet;
import com.share.device.domain.PowerBank;

import java.util.List;
import java.util.Map;

public interface IPowerBankService extends IService<PowerBank> {
    //分页查询
    List<PowerBank> selectListPowerBank(PowerBank powerBank);

    ////添加
    int savePowerBank(PowerBank powerBank);

    //修改
    int updatePowerBank(PowerBank powerBank);

    PowerBank getByPowerBankNo(String powerBankNo);

    Map<String,PowerBank> getPowerBankByCabinetId(Long cabinetId);

    /**
     * 更新充电宝电量
     * @param powerBankNo 充电宝编号
     * @param electricity 电量
     * @return 是否更新成功
     */
    boolean updateElectricity(String powerBankNo, Integer electricity);

    List<PowerBank> searchNoUseList(String keyword);

}
